package conversion.service.impl;

import conversion.bean.User;
import conversion.mapper.UserMapper;
import conversion.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public List<User> getAllUsers() {
        return userMapper.getAllUsers();
    }

    @Override
    public User getUserByUUID(String id) {
        return userMapper.getUserByUUID(id);
    }

    @Override
    public User getUserByUsername(String username) {
        return userMapper.getUserByUsername(username);
    }

    @Override
    public void deleteUserByUUID(String id) {
        userMapper.deleteUserByUUID(id);
    }

    @Override
    public void updateUserByUUID(User user) {
        userMapper.updateUserByUUID(user);
    }

    @Override
    public void addUser(User user) {
        userMapper.addUser(user);
    }

    @Override
    public User findUserByEmail(String email) {
        return userMapper.findUserByEmail(email);
    }

}
